package rcp.iphex2.ui.projectexplorer.commandhandler;

import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.ui.handlers.HandlerUtil;

import rcp.iphex2.model.ModelProvider;
import rcp.iphex2.ui.projectexplorer.ProjectExplorerView;

public class SetProjectHandler extends AbstractHandler {

	@Override
	public Object execute(ExecutionEvent event) throws ExecutionException {
		System.out.println("SetProjectHandler");
		ProjectExplorerView projectExplorerView = (ProjectExplorerView) HandlerUtil.getActivePart(event);
		projectExplorerView.setProject(ModelProvider.INSTANCE.getProject("Default2"));
		return null;
	}

}
